package com.briup.cms.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description 工具类实现保存用户信息及获取用户信息
 * @Author lining
 * @Date 2021/7/18 15:08
 * @Version 1.0.0
 */
public class UserInfo {
    //private static Map<String,Object> map = new HashMap<>();
    private static ThreadLocal<Map> threadLocal = new ThreadLocal<>();
    //设置用户线程信息
    public static void setUserinfo(Map<String,Object> map){
        threadLocal.set(map);
    }
    //获取用户线程信息
    public static Map<String,Object> getUserInfo(){
        return threadLocal.get();
    }
}
